Archive for the ‘Linux’ Category
Password Protect Directory with NGinx
& Ubuntu 16.04 sudo apt-get install apache2-utils htpasswd -c /home/username/.htpasswd username Login: username Password: your_cool_password those lines are added to “/etc/nginx/sites-available/cool_site_config config location /restricted_area { auth_basic “Administrator Login”; auth_basic_user_file /home/username/.htpasswd; }
In: English, Linux, nginx, Ubuntu
New Ubuntu 16.04 install with Apache2 & Multiple PHP versions on the same machine
Don’t have much time time – so a very quick guide: sudo apt install openssh-server sudo apt-get install -y mc openssh-client git wget apache2 build-essential php php-json apt install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php5.6-fpm a2enmod proxy_fcgi setenvif a2enconf php7.0-fpm # if you want to make 5.6 main version: > […]
RapidSSL cert installation on nginx server
I recently installed RapidSSL cert and got “not trusted” message on Android (desktop browsers were both ok) Now… this is how to install RadidSSL cert properly. Step 1: got and check your installation here https://cryptoreport.rapidssl.com/checker/views/certCheck.jsp – if you’ve got nothing working yet – just download RapidSSL SHA256 CA cert from here: https://cryptoreport.rapidssl.com/chainTester/webservice/validatecerts/certificate?certKey=issuer.intermediate.cert.84&fileName=RapidSSL%20SHA256%20CA&fileExtension=txt Or choose the […]
In: English, Linux, nginx, Ubuntu · Tagged with: nginx
Install Android SDK on Linux – in my case Ubuntu 14.04 server
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz tar -xvf android-sdk_r24.4.1-linux.tgz cd android-sdk-linux/tools ./android update sdk –no-ui create file: ~/.zshrc with follwing content: export PATH=${PATH}:$HOME/sdk/android-sdk-linux/platform-tools:$HOME/sdk/android-sdk-linux/tools:$HOME/sdk/android-sdk-linux/build-tools/23.0.2/ sudo apt-get install libc6:i386 libstdc++6:i386 sudo apt-get install zlib1g:i386
Linux install Java 8 from Oracle
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer sudo apt-get install oracle-java8-set-default
How to resize (make it bigger) partition on Ubuntu 14.04 in Command Line
Let’s assume you have new virtual Linux Server box running and you “suddenly” out of space. Shit. Well, you stopped your VM and increased the size of you hard drive from 20Gb to 40Gb, started VM again and… nothing changed. This is what I did: Sttep1: First i run cfdisk and removed swap (yes, you […]
In: English, Fighting the system, Linux
rsync to Amazon AWS server using PEM file
One liner here: rsync -rave –filter=’merge public/.rsync-filter’ “ssh -i /keypath/key.pem” $PWD/public/* ubuntu@55.55.55.55:/var/www/www.server.com/
How quickly copy one DB to another
Well, this is quite simple actually: mysqldump -u db_user -pYourPass -h 127.0.0.1 database_name_from | mysql -u db_user -pYourPass -h 127.0.0.1 database_name_to
In: English, Linux, mySQL, Ubuntu
MS’SQL on Ubuntu Linux via PHP
Hi Folks, today we are going to install & use MS’SQL on Ubuntu Linux! Yay! Well, in fact installation is very simple with a tiny twists 😉 Installation (very simple): sudo apt-get install php5-mssql Now how to use it? PHP Code below: // Connect to MSSQL $link = mssql_connect($db[‘from’][‘server_ip’], $db[‘from’][‘username’], $db[‘from’][‘password’]); if (!$link) { […]
In: English, Fighting the system, Linux, MS'SQL, Ubuntu
Sendmail alternative – postfix on ubuntu (when PHP doesn’t send emails) in a few easy steps
Imagine you have your new shiny Ubuntu server. You installed your php, apache & mysql and everything seems fine until… you realised your system doesn’t send emails. If there is a problem – there must be a solution! In our case it’s either install good (… not so in fact) sendmail or postfix. We decided […]
In: Fighting the system, Linux, Ubuntu · Tagged with: install, linux, php, postfix, ubuntu