首頁 > 軟體

Ubuntu 14.04 搜狐更新源及安裝軟體

2020-06-16 17:43:54

Ubuntu 14.04 搜狐更新源及安裝軟體

sudo vim /etc/apt/source.list

# 將軟體源改為 sohu 的
deb http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ trusty-backports main restricted universe multiverse

2. 更新並升級已有軟體,並安裝一些基礎依賴庫

apt-get update
apt-get upgrade
apt-get install libcurl3-dbg curl libpcre3 libpcre3-dev libcurl4-openssl-dev  libyaml-dev

3. 安裝軟體
•Nginx/MySQL/Redis/Git/SVN
apt-get install nginx mysql-server redis-server git subversion

•PHP 及核心擴充套件

apt-get install php5

# 中途出現 apache 相關的警告和錯誤,說明系統預設安裝了 Apache,解除安裝之
apt-get remove apache2
apt-get autoremove

# 安裝核心擴充套件
apt-get install php5-dev php5-cgi php5-cli php5-fpm php5-common php5-mysql php5-curl php5-dbg php5-json php5-gd php5-mcrypt php5-redis

 

•Composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

•PHP 在 PECL 上的擴充套件 Yaf/Yar 等擴充套件
pecl install yaml
pecl install yaf
pecl isntall yar

•Phalcon
# 下載的原始碼放在 /source 目錄下
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install

設定

sudo vim /etc/php5/mods-available/private.ini

extension=yaml.so
extension=yaf.so
extension=yar.so
extension=phalcon.so
extension=swoole.so

ln -s /etc/php5/mods-available/private.ini /etc/php5/fpm/conf.d/30-private.ini
ln -s /etc/php5/mods-available/private.ini /etc/php5/cli/conf.d/30-private.ini
ln -s /etc/php5/mods-available/private.ini /etc/php5/cgi/conf.d/30-private.ini


IT145.com E-mail:sddin#qq.com