-
Search
Categories
-
Linux, PHP, LAMP, The Web in a blog- Android – how to develop directly on a phone
- Android drawable default icons – they are free to use
- Android how to read and write files
- Uncompress on the fly when copying a file from a remove location with scp
- Setting up an encrypted volume on an external hard drive on CentOS
- Linux bash – tar tricks
- Implement Selenium tests
- Using a downloaded package without IDE in Java
- CSS selectors optimisation
- Ubuntu Linux on Acer Aspire AO751h
Tag Cloud
alarm array backup begin button character commercial constants coppermine CSV DVD eclipse ecommerce email email server expect firefox font foreach formatting fstab ftp GMail gnome keyboard Lucene marketing memcached mount plugin profiling protect regexp scp Selenium SEO sftp split svn tar utf utf8 Vbulletin Virtual Server Web Dev Security
Category Archives: System Administration
Rsync – Deploy And Increment Backup
It’s good for deploy as well. It can be used locally (like this: rsync -aHvzO –progress staging/ www/). Very useful to move big amount of data over the Internet because of its incremental feature. By default it uses SSH for … Continue reading
Linux – Check Apache and MySQL Are Running, Otherwise Start Them
The file is also reachable through this link: lamp-guarddog #!/bin/sh # Check whether Apache or/and Mysql server are down. If so, it starts them. SERVICE_HTTP=’/usr/sbin/httpd’ SERVICE_MYSQL=’/usr/libexec/mysqld’ ADMIN_EMAIL=’danieleocchipinti.it@gmail.com’ if ps ax | grep -v grep | grep $SERVICE_HTTP > /dev/null then … Continue reading
Posted in LAMP Server Setup
Leave a comment
Virtuozzo Knowledge Base
It’s not possible to get the Virtuozzo’s Backup though FTP or through SSH as the backup is stored on the main server on which the VPS is hosted (but outside the VPS). Also the backup is in Virtuozzo format and … Continue reading
Posted in System Administration
Leave a comment
PHP – Run a script from the command line
You can do either: php myscript.phpIn that case myscript.php will be like this: <?php echo “CIAO” ?> ./myscriptIn that case myscript.php will be like this: #!/usr/bin/php <?php echo “CIAO” ?> In order to find out where the php executable lives, … Continue reading
Posted in PHP, System Administration
Leave a comment
PHP for System Administration Using CLI
Example 1: Script example1.php: < ?php $line = trim(fgets(STDIN)); echo $line ?> Launching this command: top -b -n 1|head -5|tail -1 | php example1.php The output will be: Swap: 9839804k total, 0k used, 9839804k free, 274892k cached /////////////////////////////////////////// Example 2: … Continue reading
Posted in PHP, System Administration
Leave a comment
Fast LAMP Server – Debian Lenny
apt-get install apache2 php5 libapache2-mod-php5 apt-get install php5-xsl php5-gd php5-cli apt-get install mysql-server mysql-client php5-mysql In order to enable the use of .htaccess, you need to edit this file: /etc/apache2/sites-available/default In the section <Directory /var/www/>, change to: AllowOverride all In … Continue reading
Secure PHP & Apache Configuration
PHP Disable error messages expose_php Off Check you can’t get info by doing telnet localhost 80 and then issueing: HEAD / HTTP/1.0 session.use_only_cookies = 1 allow_url_fopen Off [if you don’t really need the opposite] register_globals = Off magic_quotes_gpc = ??? … Continue reading
Posted in Apache, LAMP Server Setup, PHP, Security, Web Dev Security
Tagged Web Dev Security
Leave a comment
LAMP on Ubuntu
apt-get install apache2 apt-get install php5 libapache2-mod-php5 apt-get install php5-xsl php5-gd /etc/init.d/apache2 restart apt-get install mysql-server apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin apt-get install bind9 apt-get install php5-cli ln -s /etc/apache2/mods-available/vhost_alias.load /etc/apache2/mods-enabled/vhost_alias.load ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
Server Setup and LAMP Setup From Scratch with full UTF support (utf8)
Set the clock date MMDDhhmmYYYY hwclock –systohc & Where: M=month, D=day, h=hour, m=minute, Y=year The latter command is essential: it copies the date into the BIOS and makes the change definitive First steps * echo “hostname_you_chose” > /etc/hostname /bin/hostname -F … Continue reading
