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 … 更多...

Mac OS X 10.8编译PHP5.4

./configure 
--prefix=/usr 
--mandir=/usr/share/man 
--infodir=/usr/share/info 
--sysconfdir=/private/etc 
--with-apxs2=/usr/sbin/apxs 
--enable-cli 
--with-config-file-path=/etc 
--with-libxml-dir=/usr 
--with-openssl=/usr 
--with-kerberos=/usr 
--with-zlib=/usr 
--enable-bcmath 
--with-bz2=/usr 
--enable-calendar 
--with-curl=/usr 
--enable-dba 
--enable-exif 
--enable-ftp 
--with-gd 
--enable-gd-native-ttf 
--with-icu-dir=/usr 
--with-iodbc=/usr 
--with-ldap=/usr 
--with-ldap-sasl=/usr 
--with-libedit=/usr 
--enable-mbstring 
--enable-mbregex 
--with-mysql=mysqlnd 
--with-mysqli=mysqlnd 
--without-pear 
--with-pdo-mysql=mysqlnd 
--with-mysql-sock=/var/mysql/mysql.sock 
--with-readline=/usr 
--enable-shmop 
--with-snmp=/usr 
--enable-soap 
--enable-sockets 
--enable-sysvmsg 
--enable-sysvsem 
更多...

让Mac OS X中的PHP支持mcrypt

下载并解压libmcrypt-2.5.8.tar.gz。
在终端执行如下命令:
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure --disable-posix-threads --enable-static
make
sudo make install

下载并解压PHP源码文件php-5.x.tar.gz。
在终端执行如下命令:
tar zxvf php-5.x.tar.gz
cd php-5.x/ext/mcrypt
phpize
./configure
make
sudo make install

打开php.ini
sudo vi /etc/php.ini

在php.ini中加入如下代码,并保存后退出,然后重启Apache
extension=mcrypt.so
更多...