Last update at :2024-05-01,Edit by888u
There are always people who are concerned about how to set up a blog on a vps with 64MB of memory. Today, your dear group owner will tell you how to set it up. It is actually very simple, exactly the same as our last tutorial, except that the pictures in it are broken, so I will add them.
The only 64M memory VPS I have is sentris, so I’ll use this one and reinstall the system to centos-6-x86-minimal first.
vps connected with putty
As you can see, the memory is indeed 64M.
Then start the installation. 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
Just press Enter 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 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 well.
There will be four confirmations next, 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 already packaged Apache, run the installation directly:
yum install httpd
Also configure the system to let Apache start with the system:
chkconfig --levels 235 httpd on
After the configuration is complete, 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 configuration is stored in the /etc/httpd/conf.d/ directory.
3. Install PHP
Enter the following command to install PHP:
yum installphp
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
You need to restart the Apache module to take effect:
/etc/init.d/httpd restart
Okay, the installation is complete. Put our blog file in this directory [/var/www/html]. We use winscp to upload a probe and take a look.
5. 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 the wordpress database and run it with putty
mysql -u root -p
You will then be prompted to enter your mysql password, just enter it
and then run
create databases wp;
After running successfully, 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 it, 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 will hang easily. Just refresh it more. It would be better to use emlog.
Finally, let me promote my website: www.runcpp.com
Recommended site search: website registration information, Singapore server, Korean cn2 server, registered domain name, Hong Kong vps host, independent IP host, game high defense server, Hong Kong server defense, website registration system, cn domain name price,
p>
发表评论