Debian Cheat Sheet For Beginners!

When I got my first debian server with webmin I was totally clueless and commands such as apt-get really intimated me.

When I got my first debian server with webmin I was totally clueless and commands such as apt-get really intimated me. I am now on my second debian server and I have found help for the questions you are most likely to find when you first start off with self managed vps. All servers I use have webmin pre-installed so if you want to find out how to install webmin on debian, google it. Here are the situations I encountered that needed a remedy, but use at your own risk because i am no professional:

Shell commands and what to install first?

If you have webmin then use there Command Shell found on the right menu under Others >> Command Shell. This is handy for the quick commands without java. Also you should possibly download putty to use as a fast way of logging into your command for SSH.

Install the zip packages

Go to your command shell and type and execute the following commands. Make sure to wait for each command to finish executing before moving to the next one:


Apt-get install unzip

Apt-get install zip

Apt-get install gzip

Apt-get install bzip2

Apt-get install p7zip

The commands will install the various zip commands on your sever which will be needed if you plan to unzip or zip files via webmin file manager.

Getting Php mail function to work (sendmail and postfix).

I don’t use email on my sever I use gmail or yahoo for that, but you need a mail module installed to take advantage of php send mail used for sending mail in joomla or drupal for registering members or contact requests. To do this you can either log into webmin or by shell command:

Webmin:

Click “unused modules”  and find and click postfix mail sever. You will probably get some message about the config file not being correct, ignore it for now and click the “click here” text to get webmin to install it. That should enable your website to send emails using the php mail function.

Apt:

Apt-get install postfix

Type Y to all the questions postfix asks.

To install sendmail:

Apt:

Apt-get install sendmail

Webmin:

Click “unused modules”  and find and click sendmail mail sever. You will probably get some message about the config file not being correct, ignore it for now and click the “click here” text get webmin to install it. Now in some cases it will be fine but in some cases you will be unable to install it due to an error. The fix?

Use command shell and type :

Apt-get install sendmail-bin

Wait until it is finished and press Y when needed and then type and execute:

Apt-get install sendmail

And that should solve your problem.

How to point a domain to your server using domain registers dns?

I host my domains with name cheap and they provide a free nameserver service. If your with name cheap then login and select your domain. From the left menu select “all host records” under “host management” and  enter your servers IP address in the two top fields called @ and www. Select A (Address) from the drop down box as the record type for the two fields. Click save.

Log into Webmin and click, Select Servers >> Apache Webserver from the left menu. Click “Create Virtual Host” and fill in the following fields:

Document Root: /home/yourdomain/www

Server Name: yourdomain.com

Add virtual server file: Click Standard httpd .conf file


Leave the rest of the options alone and click “Create now”. Now repeat the above again but this time use www.yourdomain.com as the server name. Create.

Click Apply Changes found on the top right.

That’s it you are good to go.

Debian change all folder and file group and user?

Sometimes when you are moving your website to a new server you will unzip a backup only to find the user and group are wrong. To change this you must first go to your command shell and type and execute the following command:

chown -R root:root /home/yourdomain/www

You can change the “root” (root:root) user and group to whatever suits you.

Debian file permissions bulk change?

Login to webmin or putty to use command shell. Type the following:

Chmod all files in the directory of /home/www/yourdomain to 644:

find /home/yourdomain/www -type f -print0 | xargs -I {} -0 chmod 0644 {}

Chmod all folders in the directory of /home/www/yourdomain to 755:

find /home/yourdomain/www -type d -print0 | xargs -I {} -0 chmod 0755 {}

Make sure you get the directory location correct and everything will be fine. Once you have tried the commands go to your fie manager in webmin and click on a file in the directory of /home/yourdomain/www. Click Info from the top menu to see the file permissions. You may need to hit refresh if you were in the directory at the time of executing the commands.

Debian joomla folder and file permissions 775 or 777.

775 is more secure then 777 and provides what you need. Copy and paste the full code below to chmod the directories for joomla. Of course make sure you change /home/yourdomain/www to your website root.


chmod 755 /home/yourdomain/www/public/administrator/backups;
chmod 755 /home/yourdomain/www/public/administrator/components;
chmod 755 /home/yourdomain/www/public/administrator/language;
chmod 755 /home/yourdomain/www/public/administrator/language/en-GB;
chmod 755 /home/yourdomain/www/public/administrator/modules;
chmod 755 /home/yourdomain/www/public/administrator/templates;
chmod 755 /home/yourdomain/www/public/components;
chmod 755 /home/yourdomain/www/public/images;
chmod 755 /home/yourdomain/www/public/images/banners;
chmod 755 /home/yourdomain/www/public/images/stories;
chmod 755 /home/yourdomain/www/public/language;
chmod 755 /home/yourdomain/www/public/language/en-GB;
chmod 755 /home/yourdomain/www/public/language/pdf_fonts;
chmod 755 /home/yourdomain/www/public/media;
chmod 755 /home/yourdomain/www/public/modules;
chmod 755 /home/yourdomain/www/public/plugins;
chmod 755 /home/yourdomain/www/public/plugins/content;
chmod 755 /home/yourdomain/www/public/plugins/editors;
chmod 755 /home/yourdomain/www/public/plugins/editors-xtd;
chmod 755 /home/yourdomain/www/public/plugins/search;
chmod 755 /home/yourdomain/www/public/plugins/system;
chmod 755 /home/yourdomain/www/public/plugins/user;
chmod 755 /home/yourdomain/www/public/plugins/xmlrpc;
chmod 755 /home/yourdomain/www/public/templates;
chmod 755 /home/yourdomain/www/public/cache;
chmod 755 /home/yourdomain/www/public/administrator/cache;
chmod 755 /home/yourdomain/www/public/logs;
chmod 755 /home/yourdomain/www/public/tmp


You can also change the file and folder group to www-data by using these commands:

chown www-data:www-data -R /home/yourdomain/www/public/administrator/backups;
chown www-data:www-data -R /home/yourdomain/www/public/administrator/components;  
chown www-data:www-data -R /home/yourdomain/www/public/administrator/language;  
chown www-data:www-data -R /home/yourdomain/www/public/administrator/language/en-GB;      
chown www-data:www-data -R /home/yourdomain/www/public/administrator/modules;  
chown www-data:www-data -R /home/yourdomain/www/public/administrator/templates;
chown www-data:www-data -R /home/yourdomain/www/public/components;  
chown www-data:www-data -R /home/yourdomain/www/public/images;
chown www-data:www-data -R /home/yourdomain/www/public/images/banners;
chown www-data:www-data -R /home/yourdomain/www/public/images/stories;
chown www-data:www-data -R /home/yourdomain/www/public/language;  
chown www-data:www-data -R /home/yourdomain/www/public/language/en-GB;
chown www-data:www-data -R /home/yourdomain/www/public/language/pdf_fonts;  
chown www-data:www-data -R /home/yourdomain/www/public/media;
chown www-data:www-data -R /home/yourdomain/www/public/modules;
chown www-data:www-data -R /home/yourdomain/www/public/plugins;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/content;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/editors;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/editors-xtd;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/search;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/system;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/user;
chown www-data:www-data -R /home/yourdomain/www/public/plugins/xmlrpc;
chown www-data:www-data -R /home/yourdomain/www/public/templates;
chown www-data:www-data -R /home/yourdomain/www/public/cache;
chown www-data:www-data -R /home/yourdomain/www/public/administrator/cache;
chown www-data:www-data -R /home/yourdomain/www/public/logs;
chown www-data:www-data -R /home/yourdomain/www/public/tmp

How to install ioncube on debian 32 and 64 bit?

On todays CMS systems some modules and components need ioncube to function. Some server providers have ioncube pe-install others do not. It is easy to install ioncube on debian. You will need command shell to process the following commands:

Debian 32bit

Cd /tmp/

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz  

tar xvfz ioncube_loaders_lin_x86.tar.gz

mv ioncube /usr/local/lib/

Add the following code snippet to the top of your php.ini file found in etc/php5/achpace/php.ini. Directly after the [php] tag:

zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so

Restart sever


Debian 64bit

Cd /tmp/

wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz  

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

mv ioncube /usr/local/lib/

Add the following code snippet to the top of your php.ini file found in etc/php5/achpace/php.ini. Directly after the [php] tag:

zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.3.so

Restart sever


Read the readme file in usr/local/lib/ioncube for more info on the next stage of installing ioncube on your domain. I hope you found this article useful  and it helps you to get to grips with your new vps. If you re-publish this article please link back to otherarticles.com or bestfreewebistes.net which is a web directory of the best websites.

Reference:

http://www.taxze.com/how-to-install-ioncube-loader-on-debian-50x-64bit-directadmin-installed.htm

http://www.debiantutorials.com/installing-ioncube/

http://www.howtoforge.com/forums/archive/index.php/t-9345.html

http://www.emcken.dk/weblog/archives/37-chmod-distinguish-between-files-and-directories.html



Comments

Marketplace Offers

eric-watson
450 Words
From only $5
freelance-content-writer-in-nagpur
500 Words
From only $00


Most Read



Using this website means you accept our Terms and Privacy Policy. Content published by users is licensed under a Creative Common License.

Please be vigilant when exploring external websites linked from the articles/ads/profiles on this website.

© otherarticles™ 2017 | Images and design © to Otherarticles (OA).