Last active
April 26, 2016 18:14
-
-
Save jakwuh/dc28c18ad37d0979134e to your computer and use it in GitHub Desktop.
LAMP server configuration
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
# reset root password | |
sudo su | |
service mysql stop | |
/usr/sbin/mysqld --skip-grant-tables --skip-networking | |
mysql | |
FLUSH PRIVILEGES; | |
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); | |
/etc/init.d/mysql stop | |
/etc/init.d/mysql start | |
# create user for database | |
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'; | |
FLUSH PRIVILEGES; |
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
sudo su | |
apt-get install nodejs | |
apt-get install npm | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash # install nvm | |
source ~/.profile # if source not available then reboot | |
nvm install 5.9.0 |
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
sudo su | |
add-apt-repository ppa:ondrej/php | |
apt-get update | |
apt-get install php7.0 php7.0-mysql php7.0-mbstring php7.0-intl php7.0-xml php7.0-zip # this will replace old php packages with new | |
# apt-get install php7.0-dev # lots of mods | |
apt-get install libapache2-mod-php7.0 # will remove libapache2-mod-php5 | |
# enable extensions as needed | |
a2enmod rewrite | |
service apache2 restart |
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
cd tmp | |
git clone https://github.com/phpredis/phpredis.git | |
cd phpredis | |
git checkout php7 | |
phpize | |
./configure | |
make && make install | |
cd .. | |
rm -rf phpredis | |
echo "extension=redis.so" > /etc/php/7.0/mods-available/redis.ini | |
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/fpm/conf.d/20-redis.ini | |
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/cli/conf.d/20-redis.ini | |
ln -sf /etc/php/7.0/mods-available/redis.ini /etc/php/7.0/apache2/conf.d/20-redis.ini | |
service apache2 restart |
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
apt-get install supervisor | |
# /etc/supervisor/conf.d/<your_config_here> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment