配自己vps,wordpress时的一些笔记

0. ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
1. lnmp给用户设密码失败,我操。。。只能自己来。。。坑爹,怪不得sql一直连接不上。。。
重改密码!

# /etc/init.d/mysql stop
# mysqld_safe –user=mysql –skip-grant-tables –skip-networking &
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(‘newpassword’) where USER=’root’;
mysql> FLUSH PRIVILEGES;
mysql> quit

# /etc/init.d/mysqld restart
# mysql -uroot -p
2.Download WordPress
cd /var/www/html
wget http://wordpress.org/latest.zip
unzip latest.zip
rm latest.zip
# remove superfluous directory
mv wordpress/* ./
rmdir wordpress/
# wordpress needs these to be writable by the webserver
mkdir wp-content/uploads wp-content/cache
chown apache:apache wp-content/uploads wp-content/cache
Configure WordPress
# copy default config
cp wp-config-sample.php wp-config.php

# set username / password
# make sure you change your password to something more awesome
sed -i -e ‘s@putyourdbnamehere@wordpress@’ wp-config.php
sed -i -e ‘s@usernamehere@wordpress@’ wp-config.php
sed -i -e ‘s@yourpasswordhere@an-awesome-password@’ wp-config.php
browner:http://your-server-ip-or-hostname/wp-admin/install.php

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据