Last update at :2024-02-05,Edit by888u
Many friends have VPS in their hands, but some VPS are only used for watching videos, surfing Google, etc. due to insufficient configuration. Today we are going to introduce a small one with 64M memory to install WP blog. The 256M in your hand There is no problem with the installation. You can try to install a blog to write about in case it becomes developed.
Environment configuration
For the 64M memory VPS the blogger has, first reinstall the system into centos-6-x86-minimal.
vps connected with putty
As you can see, the memory is indeed 64M.
Then the installation begins. The installed version is as follows:
PHP:5.3.2
Apache: 2.2.15
MySQL: 5.1.52
1. Install mysql
1. Run: yum install mysql mysql-server
After the installation is complete, MySQL can start automatically with the system and continue to run
chkconfig –levels 235 mysqld on
/etc/init.d/mysqld start
Set the password for the MySQL data root account:
mysql_secure_installation
Press Enter directly when the following prompt appears:
Enter current password for root
When the following prompt appears, enter [y] and press Enter again:
Set root password? [Y/n]
Then enter the password you need to set, press Enter and enter it again to confirm:
Note that the password you enter will not be displayed. This is the root password of mysql. Be sure to keep it safe.
There will be four more confirmations, namely:
Remove anonymous users? [Y/n]
Disallow root login remotely? [Y/n]
Remove test database and access to it? [Y/n]
Reload privilege tables now? [Y/n]
Just press Enter.
2. Install apache
Since CentOS has packaged Apache, run the installation directly:
yum install httpd
Similarly configure the system to let Apache start with the system:
chkconfig –levels 235 httpd on
After configuration, start Apache:
/etc/init.d/httpd start
If nothing else, if you directly access the IP address, you should be able to see the "Apache 2 Test Page powered by CentOS" test page. Note that if this page cannot be displayed, it is usually blocked by the firewall that comes with CentOS. You only need to enter the firewall and open the "80" port corresponding to "WWW".
Note: In CentOS, the default root directory of Apache is /var/www/html, and the configuration file /etc/httpd/conf/httpd.conf. Other configurations are stored in the /etc/httpd/conf.d/ directory.
3. Install PHP
Enter the following command to install PHP:
yum install php
4. Associate the PHP module with the MySQL module
You also need to connect PHP and MySQL to work properly. Search module:
yum search php
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring
The Apache module needs to be restarted to take effect:
/etc/init.d/httpd restart
Okay, the installation is complete. Put our blog files in this directory [/var/www/html] and let’s use winscp to upload a probe to take a look
Install wordpress
At this point, we’re basically done, but we haven’t installed wordpress yet, so let’s continue. Here, we’ll use putty to run the memory cleanup command
echo 1 >/proc/sys/vm/drop_caches
If it cannot run, go to the background and restart the vps. Restarting and running the above command have the same purpose.
Okay, let's use winscp to upload wordpress.
First create a wordpress database and run it with putty
mysql -u root -p
You will then be prompted to enter your mysql password, just enter it
Then run again
create databases wp;
After successful operation, wp is your database.
Okay, let’s go back to the browser and start installing wordpress. The following situation may appear:
If the above picture appears during the installation process, then we only need to use winscp to set the permissions of the [/var/www/html] folder to 777.
Then install, just follow the normal installation steps. Because there is too little memory, it will appear that it cannot be opened during the installation process. Ignore it and continue to refresh.
If the memory is not enough, it is easy to hang. Just refresh it more. It would be better to use emlog.
Recommended site searches: domain name registration, US free hosting, US virtual space, domain name query, virtual host trial, registered domain name purchase, registered domain name purchase, virtual host rental, US free hosting, domain name registration network,
发表评论