Ubuntu指令

tail -f /var/log/mysql/error.log
tail -f /var/log/apache2/error.log

/etc/init.d/apache2 restart
/etc/init.d/mysql restart

vi /etc/apache2/apache2.conf
vi /etc/php5/apache2/php.ini
vi /etc/mysql/my.cnf

cd /etc/apache2/sites-enabled/
cd /var/www/

tar -xvzf

apt-get install memcached
memcached -d -u root -l localhost -m 64 -p 11211

apt-get update
apt-get dist-upgrade

dpkg –get-selections|grep linux
uname -a
apt-get remove linux-image-3.x.x-generic

mysql>SHOW GLOBAL VARIABLES LIKE ‘%log%’;
mysql>SHOW GLOBAL VARIABLES LIKE ‘long%’;

安装MySQL
apt-get install mysql-server mysql-client
TCMalloc优化MySQL
配置、安装PHP和扩展
a2enmod rewrite
php timezone
apt-get install php5 php5-dev
apt-get install curl libcurl3 libcurl3-dev php5-curl
apt-get install php5-apc php5-gd imagemagick php5-imagick php5-intl php5-mcrypt
apt-get install php5-memcache php5-mysql php5-sqlite php5-tidy php5-xsl

dpkg-reconfigure tzdata

vi /etc/php5/apache2/php.ini
mysql.connect_timeout = 20
expose_php = Off
vi /etc/apache2/conf.d/security
ServerTokens Prod

vi /etc/mysql/my.cnf
default-character-set = utf8

[xdebug]
zend_extension=”/usr/lib/php5/20121212/xdebug.so”
xdebug.idekey=”PHPSTORM”
xdebug.remote_host=127.0.0.1
xdebug.remote_enable=on

git config –global user.name “yannanfei”
git config –global user.email xx@xx.com

清除OS Cache:
sync
echo “3” > /proc/sys/vm/drop_caches

FLUSH QUERY CACHE;

sudo apt-get install sysstat
sudo iostat -x 2

sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove

发表回复

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

14 − 13 =