Mesaje Recente

Pagini: 1 ... 3 4 [5] 6
41
Linux / Instalare mariadb 10.3
« Ultimul mesaj de Admin Iunie 07, 2020, 11:42:17 p.m. »
In /etc/yum.repos.d deca exista MariaDB.repo pui / sau schimbi versiunea. Daca nu ai repo il touch && edit.

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum clean all && yum update

yum install mariadb

poti verifica no versiunii inainte de press "y"
42
Linux / Instalare php 7.4
« Ultimul mesaj de Admin Iunie 07, 2020, 11:38:32 p.m. »
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm

yum -y install yum-utils
yum-config-manager --enable remi-php74

yum update
yum install php php-cli


yum install php-mysqlnd php-cli php-pecl-igbinary php-xml php-json php-pecl-mcrypt php-pdo php-gd php-intl php-opcache php-pecl-zip php-pecl-msgpack php-mbstring php-process
43
Generalitati / VirtualBox
« Ultimul mesaj de Admin Aprilie 11, 2020, 07:40:49 p.m. »
Daca partea din stanga cu VM urile o ascundeti si nu stiti cum sa o accesati aveti aici comanda ce se executa cu vbox pe stop.

VBoxManage setextradata global "GUI/SplitterSizes"

44
Centos / Posibila desfiintare categorie 'Centos6'
« Ultimul mesaj de Admin Martie 21, 2020, 11:17:25 p.m. »
In curand se pare ca o sa desfiintez aceasta tema de discutii pentru ca nu mai trebuie sa fie de actualitate.
Recomand toate sistemele mutate pe >= 7 astfel ca Centos6 nu o sa mai fie de actualitate.

Chiar daca 7 este diferit in multe aspecte de 6 si poate ca apare sentimentul de a te intoarce la ce stiai sa faci, nu o faceti. Continuati cu centos7 si uitati de 6.

succes!
45
Programare / Pachete php necesare
« Ultimul mesaj de Admin Martie 21, 2020, 11:12:35 p.m. »
Diverse aplicatii folosesc functii php astfel ca php trebuie 'ajustat' cu urmatatoarele pachete:

php-cli
php-common
php-fpm
php-gd
php-mbstring
php-mcrypt
php-mysql
php-opcache
php-pdo
php-pear
php-pecl-apcu
php-pecl-igbinary
php-pecl-memcached
php-process
php-soap
php-xml

cya!
46
Generalitati / easy-rsa 2.0
« Ultimul mesaj de Admin August 06, 2019, 11:13:57 a.m. »
47
Generalitati / Mail cu 'I am a hacker who has access to your operating system.'
« Ultimul mesaj de Admin Iulie 18, 2019, 08:21:03 p.m. »
Daca primiti mesajul de mai jos nu strica sa verificati computerul sau daca habar nu aveti cum sa va instalati un antivirus.

Chiar daca nu a patruns asta nicaieri e un bun prilej sa verificati usa digitala.

Afacerea asta se bazeaza pe faptul ca vreodata tot ati facut voi ceva si de acolo video etc.

In general e fake, fac spam, dar am vazut multe asa ca nu ma mir sa fi facut o groaza de bani.

Bafta.

"Hello!

I am a hacker who has access to your operating system.
I also have full access to your account.

I've been watching you for a few months now.
The fact is that you were infected with malware through an adult site that you visited.

If you are not familiar with this, I will explain.
Trojan Virus gives me full access and control over a computer or other device.
This means that I can see everything on your screen, turn on the camera and microphone, but you do not know about it.

I also have access to all your contacts and all your correspondence.

Why your antivirus did not detect malware?
Answer: My malware uses the driver, I update its signatures every 4 hours so that your antivirus is silent.

I made a video showing how you satisfy yourself in the left half of the screen, and in the right half you see the video that you watched.
With one click of the mouse, I can send this video to all your emails and contacts on social networks.
I can also post access to all your e-mail correspondence and messengers that you use.

If you want to prevent this,
transfer the amount of $500 to my bitcoin address (if you do not know how to do this, write to Google: "Buy Bitcoin").

My bitcoin address (BTC Wallet) is:  3FnkaND5zg2eaYMzBuw6Fc7FE8G4gVR5My

After receiving the payment, I will delete the video and you will never hear me again.
I give you 50 hours (more than 2 days) to pay.
I have a notice reading this letter, and the timer will work when you see this letter.

Filing a complaint somewhere does not make sense because this email cannot be tracked like my bitcoin address.
I do not make any mistakes.

If I find that you have shared this message with someone else, the video will be immediately distributed.

Best regards!"

48
Programare / mysql stuff
« Ultimul mesaj de Admin Iunie 29, 2019, 01:59:29 p.m. »
//

 CREATE TABLE counters(
     id INT NOT NULL UNIQUE,   -- multiple counters can be stored in this table, this is its id
     value INT                            -- current value of the counter
  );
 
  -- Initialize the first counter with start value 10
  INSERT INTO counters VALUES (1, 10);
 
  -- Let's get the current value
  SELECT value FROM counters WHERE id = 1;
 
  -- Increment the counter
  UPDATE counters SET value = value + 1 WHERE id = 1;

//

START TRANSACTION;
 
  -- Let's get the current value
  SELECT value FROM counters WHERE id = 1 FOR UPDATE;
 
   -- Increment the counter
  UPDATE counters SET value = value + 1 WHERE id = 1;
 
  COMMIT;

//

UPDATE counters
SET value = (@cur_value := value) + 1
WHERE id = 1;

//

UPDATE counters
SET value = LAST_INSERT_ID(value) + 1
WHERE id = 1;
49
How to cache / Cum instalez cache, memcached pe un server linux
« Ultimul mesaj de Admin Iunie 04, 2019, 05:01:37 p.m. »
Incepem cu
yum install memcached

In /etc/sysconfig ar trebui sa fie un fisier memcached care sa contina:
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="1GB"
OPTIONS=""

Cachesize il ajustam dupa necesitati apoi in setarile aplicatiilor puneti server 127.0.0.1 port 11211

Putem vedea cu memcached-tool cum arata treaba:
memcached-tool 127.0.0.1

Ca ideea nu-i deloc rau sa utilizati memcache in aplicatiile voastre mai ales daca faceti ceva interogari prin sql.

bafta
50
Programare / Stergere duplicate din tabele mysql
« Ultimul mesaj de Admin Iunie 01, 2019, 12:43:38 p.m. »
De multe ori se intampla sa avem duplicate. Asta e cum importurile, se mai dupliciteaza.
Ideea este ca mai bine importi apoi elimini, castigi timp. Fireste ca daca ai deja slug-uri care sunt indexate ai face bine sa verifici ce stergi si adaugi in xml-ul sitemap, warever :)

Ex. Tabele dup

mysql> select * from dup;
+----+------------+------------+
| id | producator | slug       |
+----+------------+------------+
|  1 | Sony       | tv-led     |
|  2 | Samsung    | galaxy-s10 |
|  3 | Huawei     | huawei-p30 |
|  4 | Samsung    | galaxy-s10 |
+----+------------+------------+

id 2 si 4 au slug identic deci

ALTER IGNORE TABLE `dup` ADD UNIQUE (producator, slug);

mysql> select * from dup;
+----+------------+------------+
| id | producator | slug       |
+----+------------+------------+
|  3 | Huawei     | huawei-p30 |
|  2 | Samsung    | galaxy-s10 |
|  1 | Sony       | tv-led     |
+----+------------+------------+

Indexii arata asa:
show index from dup;
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name   | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| dup   |          0 | PRIMARY    |            1 | id          | A         |           2 |     NULL | NULL   |      | BTREE      |         |               |
| dup   |          0 | producator |            1 | producator  | A         |           2 |     NULL | NULL   | YES  | BTREE      |         |               |
| dup   |          0 | producator |            2 | slug        | A         |           2 |     NULL | NULL   | YES  | BTREE      |         |               |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+

iar daca vrei sa stergeti:

drop index producator on dup;


bafta
Pagini: 1 ... 3 4 [5] 6