Skip to content

Instantly share code, notes, and snippets.

@merajsiddiqui
Created February 27, 2017 09:47
Show Gist options
  • Save merajsiddiqui/f77c90158a89a514619c0a7a053ee9a2 to your computer and use it in GitHub Desktop.
Save merajsiddiqui/f77c90158a89a514619c0a7a053ee9a2 to your computer and use it in GitHub Desktop.
Setting up Enviornment For PHP Developer on Linux
#Installing Sublime text
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text
#Installing git
sudo apt-get install git
#Configuring git to use
git config --global user.email "[email protected]"
git config --global user.name "Meraj Ahmad Siddiqui"
#installing apache server
sudo apt-get install apache2
#installing latest php and modules
sudo apt-get install php libapache2-mod-php php-mcrypt
sudo apt-get install php-curl
sudo apt-get install php-mongodb
#installing mysql server
sudo apt-get install mysql-server
#installing php mysql modules
sudo apt-get install mysql-server libapache2-mod-auth-mysql php-mysql
#installing phpMyAdmin and creating link
sudo apt-get install phpmyadmin
ln -s /usr/share/phpmyadmin
#installing package manager in sublime
1. go to https://packagecontrol.io/installation
2. copy the code
3 `ctrl+~` paste and enter
#creating php build in sublime, To know the path use `which php` in terminal
{
"cmd": ["/usr/bin/php", "$file"],
"file_regex": "php$",
"selector": "source.php"
}
save as : php.sublime-build
#Important packages for php developer in sublime
----devlopment & programming--
1. EditorConfig
2. phpfmt
3. All Autocomplete
4. Phpcs (Code Sniffer)
5. DocBlockr
---file transfer----
6. sftp
#installing composer
sudo apt-get install composer
#Install MongoDB
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
#status mongodb
service mongod status
#Installing PHPUnit Test Framework
wget https://phar.phpunit.de/phpunit-6.0.phar
chmod +x phpunit-6.0.phar
sudo mv phpunit-6.0.phar /usr/local/bin/phpunit
#test php unit version
phpunit --version
#installing Gearmand
sudo apt-get install gearman-job-server libgearman-dev
sudo apt-get install gearman-tools
#installing robomongo -- mongo database manager
#Robomongo 1.0 RC1 for linux (latest as on 27-Feb-2017)
wget https://download.robomongo.org/1.0.0-rc1/linux/robomongo-1.0.0-rc1-linux-x86_64-496f5c2.tar.gz
tar -xvzf robomongo-1.0.0-rc1-linux-x86_64-496f5c2.tar.gz
sudo mkdir /usr/local/bin/robomongo
sudo mv robomongo-1.0.0-rc1-linux-x86_64-496f5c2/* /usr/local/bin/robomongo
./robomongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment