记一次php5.3.10安装

安装环境 CentOS 6.6 x64 php 5.3.10 安装编译工具 yum install -y gcc gcc-c++ 安装mysql yum install -y mysql mysql-devel #如果是64位系统,执行 ln -s /usr/lib64/mysql/* /usr/lib/ 安装依赖 yum install -y libxml2-devel openssl-devel libcurl-devel libjpeg-turbo-devel libpng-devel freetype-devel openldap-devel cyrus-sasl-ldap libtool libtool-ltdl-devel #如果是64位系统,执行 ln -s /usr/lib64/libldap* /usr/lib/ ln -s /usr/lib64/mysql/* /usr/lib/ openldap-devel 这个在我工作的项目当中使用到了,如果不需要这个可以不要安装这个 安装php curl -o php-5.3.10.tar.gz 'http://museum.php.net/php5/php-5.3.10.tar.gz' tar xzvf php-5.3.10.tar.gz cd php-5.3.10 ./configure --prefix=/usr/local/php-5.3.10 --with-config-file-path=/usr/local/php-5.3.10/etc --with-mysql --with-mysqli=mysqlnd --with-pdo-mysql --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap make make install ln -s /usr/local/php-5.3.10 /usr/local/php 启动脚本 使用下面的脚本需要修改php-fpm.conf,把pid那行的注释去掉 ...

June 27, 2017

源码安装emacs25

在Ubuntu系列用源码安装Emacs25非常简单 下载源码包 wget 'http://mirrors.ustc.edu.cn/gnu/emacs/emacs-25.2.tar.gz' tar -xzvf emacs-25.2.tar.gz 安装编译环境,依赖 首先需要把安装源码的选项打开。找到Software & Updates,把Source code勾上。另外一个办法是直接修改配置文件/etc/apt/sources.list,把前面两个deb-src前面的注释打开,然后运行一下sudo apt update。 sudo apt install build-essential sudo apt build-dep emacs24 # 25版本和24版本的依赖是一样的 安装Emacs cd emacs-25.2 ./configure make sudo make install 中文输入法 修改/etc/environment,后面添加一行LC_CTYPE="zh_CN.utf8" 用which emacs找到emacs程序的位置,备份sudo cp emacs emacs.bak,然后新建一个emacs可执行shell脚本,记得chmod +x emacs,内容如下: #!/bin/sh LC_CTYPE="zh_CN.utf8" emacs-25.2 重启一下系统 现在使用Alt+F2,输入emacs,把输入法换成中文就可以输入中文了 在CentOS7用源码安装Emacs25也是非常简单 下载源码包 wget 'http://mirrors.ustc.edu.cn/gnu/emacs/emacs-25.3.tar.gz' tar -xzvf emacs-25.3.tar.gz 安装编译环境,依赖 yum install -y ncurses-devel 安装Emacs cd emacs-25.3 ./configure make sudo make install

June 21, 2017