Before Ubuntu has been used on VPS. If it is not Linode alarm, I can't think of changing the system. Later, I found out that I can use CentOS more. It seems that Tianyuan old man is still out of date. With this article, CentOS Install APACHE+PHP
+MYSQL Process (VPS). Similarly, the reference source of this article is the official document of Linode. Linode's foreigners are really dedicated and dedicated, and the documents are written in such detail. It is difficult to play.
Basic Reading:
Getting Started and Maintaining VPS Servers
Virtual Hosting, Shared Space, VPS Hosting and Rental Hosting
Ubuntu VPS Installing Apache+PHP +MySQL Guide
The first step, the CentOS system selection settings will not be said, all in the Linode background operation.
First, log in to the VPS to modify the host name
1. Log in to the server
Use the terminal tool to log in to the server. Linux and Mac systems can use the terminal tool to log in to the SSH connection. Windows
platform can log in using Putty.
In the case of Putty, just enter the IP address, select the SSH connection, click OPEN, the first login may pop up a security warning, confirm, enter the administrator account name and password on the terminal interface. can.
2, modify the host name
The default host name is localhost, it is recommended to modify it, not only for security, but also easy to remember and identify:
echo "HOSTNAME= Myhostname" >> /etc/sysconfig/networkhostname "myhostname"
3, running updates (including kernels and packages)
yum update
If not updated Kernel, and only update packages, use the command:
yum --exclude=kernel* update
Note:
Second, install Apache for CentOS VPS
1, install APACHE
yum install httpd
2, back up httpd.conf configuration file< Br>
cp /etc/httpd/conf/httpd.conf ~/httpd.conf.backup
3. Create a virtual machine configuration file
The file path is: /etc/httpd /conf.d/
File name: vhost.conf
The content is as follows:
NameVirtualHost 12.34.56.78:80< VirtualHost 12.34.56.78:80> ServerAdmin abc@ gmail.comServerName metsky.comServerAlias www.metsky.comDocumentRoot /srv/www/metsky.com/public_html/ErrorLog /srv/www/metsky.com/logs/error.log CustomLog /srv/www/metsky.com/logs/access .log combined< /VirtualHost>
If you have multiple virtual hosts, just add <VirtualHost 12.34.56.78:80> ....</VirtualHost> in turn (assuming site placement above) The directory is /srv/www/metsky.com/public_html/).
After creation, copy and upload to /etc/httpd/conf.d/. After launching apache, the system will automatically link.
4. Create a website directory (upload file)
mkdir -p /srv/www/metsky.com/public_html
mkdir /srv/www/metsky.com/Logs
If you already have a directory or website file like metasky.com/public_html and metasky.com/logs, you can upload it directly, and later you need to modify the access rights.
5, start Apache
/etc/init.d/httpd start
After the vhost.conf modification mentioned above, you need:
/etc/init.d/httpd reload
6.Set boot Apache
/sbin/chkconfig --levels 235 httpd on
Three, install for CentOS VPS MYSQL
1, install Mysql (password assignment according to the original MYSQL allocation)
yum install mysql-server
2.Set boot up
/sbin/Chkconfig --levels 235 mysqld on
3. Start mysql
/etc/init.d/mysqld start
4. Install mysql security update
Mysql_secure_installation
At this time, enter the ROOT password, press Enter, then ask if you want to set the ROOT password, select Y, enter the new ROOT password, and enter it again.
Next, prompt to delete the anonymous account, select Y.
Whether to enable ROOT remote login, select N. (This depends on the individual, Tianyuan recommended the best choice N, if you need to remotely create a separate user for remote login.)
Delete the test database, select Y.
Reload the permission table and select Y.
5, login MSYQL
mysql -u root -p
If it is the first login, the password is empty, you can directly press
Modify the ROOT password command as follows: mysql>use mysql;
mysql>UPDATE user SET password=PASSWORD('mypassword') WHERE user='root';
mysql>FLUSH PRIVILEGES; Is: mypassword
Before downloading the files on the Linux machine via FTP, upload it after the Windows editing, so
Redis is an open source, log-based, Key-Value database that is written in ANSI C, supports networki
It is quite cumbersome to add and remove programs in Linux. The installation of th
Tizen 1.0 was released, and Taize is a Linux-based open source software platform that runs on smartp
Vmware 9 installation Mac 10.8 OS
RHEL5.4 install nginx-1.0 + php-5.2.17 (fastcgi) + mysql-5.1.40
Several methods linux time zone changes
Linux system management and maintenance -ls command
Nginx limits the number of concurrent connections for a single IP
Installation of Chinese fonts under the Linux operating system
Nagios latest version installation under CentOS5.5
Linux operating system firewall configuration modification instruction set
Win10 system upgrade 0x80070002 error situation analysis and solution
XP system does not have a clipboard how to do? XP system clipboard function open method
Analysis of mouse sensor delay problem when using laptop to play Warcraft
Win7 configuration low optimization preferred Close visual effects graphic tutorial
How does the Win7 system display the file suffix name and how to modify it?
Using Yum to manage local software packages
Windows8 skills knowledge literacy 50 win8 use skills Daquan
How to turn off the default navigation sound in win7 computer?