Skip to content

Instantly share code, notes, and snippets.

View Mouad-BGD's full-sized avatar

Mouad BOUGDOUR Mouad-BGD

View GitHub Profile
@Mouad-BGD
Mouad-BGD / linux--rpm
Created May 25, 2012 21:48
rpm commands
Rpm
+++
To install a package (i=install v=verbose h=show hash marks) rpm -ivh package
To uninstall (erase) a package rpm -e package
To upgrade a package rpm -Uvh package
To test a package to see how it would install (without installing, also checks dependencies) rpm -Uvh --test package
To verify a package (extra verbose output) rpm -Vvv package
To verify ALL installed packages on the system rpm -Va
@Mouad-BGD
Mouad-BGD / linux--gnome3
Created May 25, 2012 21:51
add application luncher in gnome 3
Gnome 3
-------
to add shortcut application to gnome luncher
for ur account:
add the file: ~/.local/share/applications/Your_app.desktop
and past:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
@Mouad-BGD
Mouad-BGD / linux--tar
Created May 25, 2012 21:54
tar commands
tar
---
tar -zxvf {file.tar.gz}
another distenation
tar -zxvf tarball.tar.gz -C <directory>
or move to ur destination and use:
tar -zxvf {path to file.tar.gz}
@Mouad-BGD
Mouad-BGD / groups
Created May 25, 2012 21:57
linux commands
groups username check the groups of that user
useradd -G {group-name} username add user to a group
gpasswd -d username groupname remove a user from a group
@Mouad-BGD
Mouad-BGD / Errors
Created June 4, 2012 13:19
LAMP server
MySQL errors
-------------
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
start mysql deamon
phpMyAdmin
----------
Forbidden
You donEdit the /etc/httpd/conf.d/phpmyadmin.conf and uncomment the line deny from all.
@Mouad-BGD
Mouad-BGD / Apache Errors
Created June 4, 2012 13:44
apache erros vHosts and selinux...
Error
ur server dont serve css files
fix
AddHandler application/x-httpd-php .css /* To each virtualhost */
@Mouad-BGD
Mouad-BGD / Vhost
Created June 4, 2012 14:00
virtual host
for start we suggest that you combine all configuration on virtual hosting into a single file called vhost.conf located in the /etc/httpd/conf.d/ directory.
@Mouad-BGD
Mouad-BGD / linux--systemd sevices
Created June 4, 2012 14:21
manages services in linux
systemctl start mysqld.service
systemctl stop mysqld.service
systemctl enable mysqld.service Enable the service over reboots (which just sets up some symlinks in the relevant dirs). same as chkconfig mysqld on
systemctl disable mysqld.service
systemctl status mysqld.service
If you want to use the service commands they should still work as well:
service mysqld start
@Mouad-BGD
Mouad-BGD / Clean urls
Created June 4, 2012 19:09
Drupal instalation
if u have rewrite module installed : check by apachectl -M or apache2ctl -M
then check if the .htaccess is enabled (by default default is disabled)
to enable it go /etc/httpd/conf/httpd.conf and change:
<Directory />
Options FollowSymLinks
AllowOverride None /* change None to All */
to
<Directory />
@Mouad-BGD
Mouad-BGD / eclipse
Created June 5, 2012 13:07
eclipse set up
eclipse.ini
openFile
-vm
/usr/java/jdk1.7.0_04/bin/java // add this line
-vmargs
-Xms40m
-Xmx384m