-
-
Save klauskpm/4715809 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
""" PHP install script. Tested with ubuntu 12.10""" | |
import os | |
ubuntu_packs = [ | |
"mysql-server", | |
"mysql-client", | |
"libxml2-dev", | |
"libicu-dev", | |
"g++", | |
"libzzip-dev", | |
"libcurl4-nss-dev", | |
"libcurl4-openssl-dev", | |
"libreadline6-dev", | |
"autoconf", | |
] | |
php_opts = [ | |
"enable-ftp", | |
"enable-mbstring", | |
"enable-intl", | |
"enable-pcntl", | |
"enable-soap", | |
"with-mysql", | |
"with-pdo-mysql", | |
"with-openssl", | |
"with-zlib", | |
"enable-zip", | |
"with-curl", | |
"with-readline" | |
] | |
# install ubuntu packs | |
for packname in ubuntu_packs: | |
os.system("sudo apt-get -y install {0}".format(packname)) | |
# configure PHP | |
os.system("./configure " + " ".join(["--" + opt for opt in php_opts])) | |
# build and install PHP | |
os.system(""" | |
make | |
sudo make install | |
""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment