Category Archives: Ubuntu

redis-commander – how to install on Utuntu 14.04 LTS

How to install it
sudo apt-get install npm
sudo chown -R $USER /usr/local
npm install -g redis-commander
ln -s /usr/bin/nodejs /usr/bin/node
redis-commander

Starting your redis-commander
redis-commander --redis-host 127.0.0.1 --redis-port 32001 -p 8081
How to access via web browser?

http://you-ip:8081

How to protect your redis-commander with a username / password

Add at the end of the redis-commander command –http-u desired-username and –http-p desired-password.

redis-commander --redis-host 127.0.0.1 --redis-port 32001 -p 8081 --http-u desired-username --http-p desired-password
References:

http://blog.biasedwalk.com/2014/02/installing-redis-commander-on-ubuntu.html
https://github.com/joeferner/redis-commander
http://www.reddit.com/r/laravel/comments/2jex9b/introducing_route_annotations_in_laravel_50/

 

Sh*ts that I install on every new server to run wordpress and laravel

  • whois
  • htop
  • iotop (monitorize disk IO)
  • iostat (sysstat – monitorize disk IO)
  • fail2ban
    • sendmail
    • iptables-persistent
  • nginx
  • mysql
  • php-fpm
    • php5-mysql
    • php5-gd
    • php5-json
    • php5-curl
    • php5-mcrypt
    • libssh2-php
    • php5-cli
    • allow short_open_tag = On on /etc/php5/fpm/php.ini
  • curl
  • vnstat
  • vnstati
  • at
    • edit /etc/at.allow and /etc/at.deny to allow/deny specific users

 

– too much IO stats? IO is important!, if we are serving thousands of files per hour.

 

ssdvirtual

 

Continue reading Sh*ts that I install on every new server to run wordpress and laravel

Ubuntu 32bits or 64bits?

I’m setting up a new machine with 8cores and 8Gb of RAM.
I had to choose between Ubuntu 32bits or 64bits

Ubuntu 64bits was the choice. Why?

If you have more than 4 GB of RAM go for 64 bit else 32 bit is just fine.

 

Use 64bit in case you do

  • video editing and processing
  • sound editing and processing
  • graphic editing and processing
  • work with large files (e.g. databases, large log files,…)

 

Got it from http://askubuntu.com/questions/19803/for-better-performance-should-i-install-32-bit-or-64-bit

 

 

ionCube loader on Ubuntu 13.10 64bits with PHP-FPM and nginx

rock ssd

Site error: the file /data/httpd/domain.com/public_html/application/controllers/frontpage.php requires the ionCube PHP Loader ioncube_loader_lin_5.6.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.

1. Download the following archives of Loaders for Linux x86-64
cd /usr/local
sudo wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz

 

2. Copy or move the Loader files

PHP modules’ folder can be found using

php -i | grep extension_dir

Example of an output
Example of an output 

mv /usr/local/ioncube/* /usr/lib/php/20151012/

Remove nginx – the ultimate guide

I had some problems with nginx, ajenti and ajenti-v…

I’v removed nginx the easy way, with apt-get autoremove nginx etc, but when I tried to start the service after install it I was getting awk: cannot open /etc/nginx/nginx.conf and nginx didn’t started etc….

This is how I removed it!

sudo apt-get autoremove nginx
sudo apt-get --purge remove nginx
sudo apt-get autoremove -f && sudo apt-get autoclean -f
sudo find / | grep nginx | sudo xargs rm -rf

 

Ubuntu 12.04.3 LTS root password

I need to access root under my Ubuntu 12.04.3 LTS, to accomplish some in-chain commands,  but I had no idea what is/was the password….

pjrfigueiredo@pornrack:~$ sudo wget http://repo.ajenti.org/debian/key -O- | apt-key add -
[sudo] password for pjrfigueiredo: ERROR: This command can only be used by root.

This is how I easily solved it…

sudo passwd

Voilá!

 

pjrfigueiredo@pornrack:~$ sudo passwd 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
pjrfigueiredo@pornrack:~$ su
Password: 
root@pornrack:/home/pjrfigueiredo# wget http://repo.ajenti.org/debian/key -O- | apt-key add -
--2013-11-01 23:05:56-- http://repo.ajenti.org/debian/key
Resolving repo.ajenti.org (repo.ajenti.org)... 108.161.187.129
Connecting to repo.ajenti.org (repo.ajenti.org)|108.161.187.129|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1716 (1.7K) [application/octet-stream]
Saving to: `STDOUT'100%[========================================================================================================================================>] 1,716 --.-K/s in 0.002s
2013-11-01 23:05:56 (1.01 MB/s) - written to stdout [1716/1716]
OK